package com.delayqueue.core.permanent;

import com.delayqueue.common.task.Task;
import com.delayqueue.core.permanent.executor.PermanentExecutor;
import lombok.AccessLevel;
import lombok.Getter;

@Getter(value = AccessLevel.PROTECTED)
public class PermanentTask {

    private Task task;
    private PermanentExecutor executor;

    public PermanentTask(Task task, PermanentExecutor executor) {
        this.task = task;
        this.executor = executor;
    }

    public void execute() {
        executor.execute(task);
    }
}
